{
  LW ExtRend -- LightWave Renderer

  External renderer handlers replace the LightWave® renderer.
  The external renderer obtains information about the scene through the LWSDK,
  and can do some limited manipulation through the command interface.

  When an external renderer is called, LightWave® will be in a rendering state.
  External renderers are supported in both Layout and ScreamerNet.

  Based on lwextrend.h which is:
  Copyright 2008, NewTek, Inc.
}

{
  Copyright 2012, Jameel Halabi

  This unit is part of the BlaiseWave wrapper,
  which is licensed under the BSD 2-Clause license (see licenses/license.txt).
}

unit LW_ExtRend;

{$mode objfpc}{$H+}

interface

uses
  LW_Server  ,
  LW_Generic ,
  LW_Handler ,
  LW_Render  ;

const

  LWEXTRENDERER_HCLASS  = 'ExtRendererHandler';

  LWEXTRENDERER_VERSION = 1 ;

type

  TEXTRENDERERIMAGE = function
                      (       Frame                  ,
                              Eye          : Integer ;
                              DisplayImage : PLWPixmap ) : Integer ;

  PLWExtRendererHandler = ^TLWExtRendererHandler;
  TLWExtRendererHandler = record
    Inst     : PLWInstanceFuncs;
    Item     : PLWItemFuncs    ;
    Options  : function
               (      Instance    : PLWInstance       ) : Integer ;
    Render   : function
               (      Instance    : PLWInstance       ;
                      FirstFrame                      ,
                      LastFrame                       ,
                      FrameStep   : Integer           ;
                      RenderImage : TEXTRENDERERIMAGE ;
                      RenderMode  : Integer           ) : Integer ;
  end;

implementation

end.

